<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ko">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="author" content="lionkang" />
<title>enjoy yourself</title>
<style type="text/css">
    @import "/css/style.css";
</style>
<?php include 'layout/javascript.php' ?>
</head>
<?php
$content = $_GET['content'];
if (!$content) {
    $fileName = 'layout/content';
} else {
    $fileName = 'contents/'.$content;
}
$fileName = $fileName.'.php';

?>
<body>
    <div id="mainBody">
        <div id="header"><?php include 'layout/header.php' ?></div>
        <div id="content">
<?php 
        if (file_exists($fileName)) {
            include $fileName;
        } else {
            echo ("[$content] 페이지를 찾을 수 없습니다.");
        }
?>
        </div>
        <div id="footer"><?php include 'layout/footer.php' ?></div>
    </div>
</body>
</html>